<%@page contentType="text/html;charset=UTF-8"%>
<%@include file="/common/commonTag.jsp"%>

<html>
	<head>
		<title>创建角色</title>
		<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
		<link rel="stylesheet" href="${path}/css/backsys/ctx.css">
	</head> 

	<body>
		<div class="ctx">
		<form action="${path}/privilegeEmp!addEmpRoleRes.action" method="post">
			<table class="ow" width="100%">
				<tr>
					<th height="30" colspan="2" align="left">分配角色</th>
				</tr>
				<tr>
					<td align=left>
						<c:forEach var="role" items="${roleList}">
							<div style="width:200px;float:left;">
								<c:forEach var="er" items="${emp.role}">
										<c:if test="${role.roleId eq er.roleId}">
											<c:set var="n" value="${role.roleId}"></c:set>
											<input type="checkbox" name="roleId" checked="checked" value="${role.roleId}"/>
											${role.roleName}
										</c:if>
								</c:forEach>
								<c:if test="${n != role.roleId}">
									<input type="checkbox" name="roleId" value="${role.roleId}"/>${role.roleName}
								</c:if>
							</div>
						</c:forEach>
					</td>
				</tr>
				<tr>
					<td colspan="2" align="center">
						<input type="hidden" name="currentPage" value="${param.currentPage}" />
						<input type="hidden" name="emp.empNo" value="${emp.empNo}" />
						<input type="hidden" name="baseform.type" value="addRole" />
						<input type="submit" value="下一步" />
					</td>
				</tr>
			</table>
		</form>
		</div>
	</body>
</html>
